<?php require_once "_sessionHelper.php"; ?>
<?php
	$con = mysql_connect("localhost","root","hello");
	if(!$con){
		die('can not connect to mysql beacuse '. mysql_error());
	}

	mysql_select_db("promotion",$con);
	mysql_query('set names gbk');
	
	$addPage = "insert into page(title,content,owner,gmt_create,gmt_modify) values('".$_POST['title']."','".$_POST['content']."','".$_SESSION['name']."',now(),now())";

	mysql_query($addPage,$con);
	
	header("Location:getMyPages.php");
	mysql_close();

?>